<template>
	<view
		style="background-color: #ebebec;width: 100%;height: 100vh;padding:  2% 0;overflow-x: hidden;padding-bottom: 6%;">
		<!--  日志记录 -->
		<view class="" v-for="(item,index) in dataList" :key="index">
			<comList :title="item.name" :listCom="dictionTable" :dictionContent="dataList[index]" :myImage="myimage">
			</comList>
		</view>
		<view class="" style="position: fixed;bottom: 0%;width: 100%;background-color: white;height: 50px;">
			<uni-pagination :total="total" :current="pageNum" @change="changePage" />
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				total: 0,
				pageNum: 1,
				myimage: 'https://i.postimg.cc/tgnyjyJB/image.png',
				dataList: [],
				dictionTable: [
					//渲染的字典
					{
						title: '员工号',
						value: 'employeeNum'
					},

					{
						title: '操作类型',
						value: 'resultInfo'
					},
					{
						title: '反馈信息',
						value: 'operationResult'
					},
					{
						title: '操作时间',
						value: 'operationTime'
					}
				]
			}
		},
		onLoad() {
			this.getProject();
		},
		methods: {
			getProject() {
				this.$request.post("/user/getSystemLog", {
						data: {
							pageNum: this.pageNum,
							pageSize: 10
						},
					})
					.then(res => {
						console.log(res, '日志记录')
						this.total = res.data.data.total;
						this.dataList = res.data.data.list;
					}).catch(err => {
						console.log('err', err);
					})
			},
			changePage(e) {
				this.pageNum = e.current;
				this.getProject();
			}

		}
	}
</script>
<style scoped lang="scss">
</style>